package com.example.hospitalsystemclient.Dataclass;

public class DataResult<E> {
    private boolean stat;
    private String message;
    private E datas;
    private Integer code;
    private Long total;

    // 构造函数
    public DataResult(boolean stat, String message, E datas, Integer code, Long total) {
        this.stat = stat;
        this.message = message;
        this.datas = datas;
        this.code = code;
        this.total = total;
    }

    // Getter 和 Setter 方法
    public boolean isStat() {
        return stat;
    }

    public void setStat(boolean stat) {
        this.stat = stat;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public E getDatas() {
        return datas;
    }

    public void setDatas(E datas) {
        this.datas = datas;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    // toString 方法
    @Override
    public String toString() {
        return "DataResult{" +
                "stat=" + stat +
                ", message='" + message + '\'' +
                ", datas=" + datas +
                ", code=" + code +
                ", total=" + total +
                '}';
    }
}